# encoding=utf8
import pymysql
"""
time:2022-10-20
author: Jimmy
"""
sql = "SELECT * from demo"
db = pymysql.connect(host='192.168.31.191',
                     user='jfrog',
                     password='1234@abcD',
                     database='jfrog',
                     charset='utf8')

cursor = db.cursor()
cursor.execute(sql)
data = cursor.fetchone()
if data==None:
    print("The reslut is None")
    print(data==None)
else:
    for result in data:
        print(result)
print ("数据库连接成功！")
db.close()